package com.cjg.functionInterface;

import java.util.stream.LongStream;

public class demo06 {
    public static void main(String[] args) {
        long l = System.currentTimeMillis();
        LongStream parallel = LongStream.rangeClosed(0l, 10_0000_0000).parallel();
        System.out.println(parallel.sum());
        long l1 = System.currentTimeMillis();
        System.out.println(l1-l);
    }
}
